
#include "Lighter.h"
#include "utils.h"

Lighter::Lighter(BHFactory* factory)
{
  utils::Assertnnull(factory, "参数类型BHFactory不能为nullptr");
  _holder = factory->get_holder();
  _bulb = factory->get_bulb();
}

std::string Lighter::Type()
{
  return "holder type: " + _holder->LhType() + "\n"
                                                "bulb type: " + _bulb->LbType();
}

Lighter::~Lighter()
{
  delete _holder;
  delete _bulb;
  _holder = nullptr;
  _bulb = nullptr;
}
